<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="jquery-3.3.1.min.js"></script>
  </head>
  <body>
    <input type="checkbox" checked>
    <script>
      // 获取表单元素的checked值
      $("input").change(function () {
        console.log($(this).prop("checked")); // 复选框选中时，输出结果为true
      });
    </script>
  </body>
</html>